package com.example.demo.mapper;

import com.example.demo.entity.ImgDetail;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;

@Mapper
public interface ImgDetailMapper {

    @Insert("insert into imgdetail (imgid,userid)values(#{imgid},#{userid})")
   public void insertDetailImg(String imgid, String userid);

    @Select("select * from imgdetail where imgid=#{imgid} and userid=#{userid}")
    public List<ImgDetail> chachong(String imgid,String userid);

    //根据ID获取图片
    @Select("select * from imgdetail where imgid=#{imgid} ")
    public List<ImgDetail> getid(int imgid);

    @Select("select * from imgdetail where userid=#{userid} ")
    public List<ImgDetail> gtuid(String userid);



}
